package my.jwds.p2037;

import java.util.Arrays;

public class MinMovesToSeat {
    public static void main(String[] args) {

    }


    public int minMovesToSeat(int[] seats, int[] students) {
        Arrays.sort(seats);
        Arrays.sort(students);
        int count = 0;
        for (int i = 0; i < seats.length; i++) {
            count += Math.abs(seats[i] - students[i]);
        }
        return count;
    }


}

